package com.lvyou.ctrls.mgr;

import com.lvyou.entity.GoodsModel;
import com.lvyou.vo.GoodsVO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

@Controller
@RequestMapping("/mgr/admin")
public class AdminCtrl {
    @RequestMapping("/query")
    public ModelAndView query() {
        /*
        视图名
        传递给jsp的数据
         */
        ModelAndView mv = new ModelAndView();
        return mv;
    }

    @RequestMapping("/save")
    public ModelAndView save(GoodsVO goodsVo) {
        ModelAndView mv = new ModelAndView();
//        goodsSrv.save(goodsVo);
        mv.setViewName("redirect:/query");
        return mv;
    }

    @RequestMapping("/showById")
    public ModelAndView showById(String id){
//    public ModelAndView queryById(){
        return null;
    }

    @RequestMapping("/deleteById")
    public ModelAndView deleteById(String id){
        return null;
    }

    @RequestMapping("/updateById")
//    public ModelAndView modifyById(String id){
    public ModelAndView updateById(String id){

        return null;
    }
}
